import request from '@/router/axios';

export const getList = (current, size, params) => {
  return request({
    url: '/api/majorSupeHazardChemManage/bladeMajorSupeHazardChem/getPage',
    method: 'get',
    params: {
      ...params,
      current,
      size
    }
  })
}

export const remove = (ids) => {
  return request({
    url: '/api/majorSupeHazardChemManage/bladeMajorSupeHazardChem/delete',
    method: 'post',
    params: {
      ids,
    }
  })
}

export const add = (row) => {
  return request({
    url: '/api/majorSupeHazardChemManage/bladeMajorSupeHazardChem/save',
    method: 'post',
    data: row
  })
}

export const update = (row) => {
  return request({
    url: '/api/majorSupeHazardChemManage/bladeMajorSupeHazardChem/update',
    method: 'post',
    data: row
  })
}

export const getMajorSupeHazardChemInfo = (id) => {
  return request({
    url: '/api/majorSupeHazardChemManage/bladeMajorSupeHazardChem/getDetail',
    method: 'get',
    params: {
      id
    }
  })
}

export const getReakSList = (current, size, params) => {
  return request({
    url: '/api/configuration/reactionkettle/page',
    method: 'get',
    params: {
      ...params,
      current,
      size
    }
  })
}

export const getCameraBinding = (current, size, params) => {
  return request({
    url: '/api/majorSupeHazardChemManage/bladeMajorSupeHazardChem/getCameraBindingPage',
    method: 'get',
    params: {
      ...params,
      current,
      size
    }
  })
}

export const bindingCamera = (ids, id) => {
  return request({
    url: '/api/majorSupeHazardChemManage/bladeMajorSupeHazardChem/bindingCamera',
    method: 'post',
    params: {
      ids,
      id
    }
  })
}

export const getCameraBindingList = (businessId, businessType) => {
  return request({
    url: '/api/majorSupeHazardChemManage/bladeMajorSupeHazardChem/getCameraBindingList',
    method: 'get',
    params: {
      businessId,
      businessType
    }
  })
}

// 巡检记录列表
export const getPatrolRecordList = (current, size, params) => {
  return request({
    url: '/api/majorSupeHazardChemManage/bladeMajorSupeHazardChem/getPatrolRecordList',
    method: 'get',
    params: {
      ...params,
      current,
      size
    }
  })
}
